package com.chenfan.ccp.plug.mq.annotation;

import com.chenfan.ccp.plug.mq.config.MqMessageTransferModel;
import com.chenfan.ccp.plug.mq.config.MqRegisterConfigure;
import org.springframework.context.annotation.Import;
import org.springframework.stereotype.Component;

import java.lang.annotation.*;

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Import(MqRegisterConfigure.class)
@Component
public @interface MqMessageListener {
    /**
     * 是否支持远程重读消费
     *
     * @return
     */

    boolean isRepeatedRemoteConsume() default false;

    /**
     * 是否本地支持重读消费
     *
     * @return
     */
    boolean isRepeatedLocalConsume() default false;


    /**
     * mq主题
     *
     * @return
     */
    String topic() default "";


    /**
     * mq传递的形式
     *
     * @return
     */
    MqMessageTransferModel transferModel() default MqMessageTransferModel.P2P;


}
